package es.androdi;

import android.app.Activity;
import android.os.Bundle;

public class Principal extends Activity {
	private ControlLogin _ctrlLogin;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        _ctrlLogin = (ControlLogin) findViewById(R.id.CtlLogin);
        
        _ctrlLogin.setOnLoginListener( new OnLoginListener() {
			
        	@Override
			public void onLogin(String usuario, String password) {
				if(usuario.equals("genio") && password.equals("hola"))
					_ctrlLogin.setMensajeLogin("Login correcto!");
				else 
					_ctrlLogin.setMensajeLogin("Login invalido");
			}
		});
    }
}